
#ifdef SM_RS

#ifdef FIRST
#define EXTERN 

#else
#define EXTERN  extern

#endif

#define SM_NUM  (SS_NUM)
typedef struct { 
    U8   FC;
    U16  DIN,DON,AIN;
	U16  DIS,DOS,AIS;
	
	U16  F1_RegNum;
	U16  F2_RegNum;
	U16  F3_RegNum,F3_sreg;
	U16  F4_RegNum,F4_sreg;
	U8   FC_RDY;
	U8   fcno;
	U16  sreg,nreg;
	
    U8   LastRsOk;
	U8   RsFailCnt;
	U8   RsAlm;
	U8   waitsec;
	U32  rs_send,rs_rev,rs_noecho,rs_fmterr,rs_crcerr; 
	U16  portno,RADDR;
	U8   agl_scan;
} SM_PARM;
EXTERN SM_PARM  SM[SM_NUM];

EXTERN U16  sm_dly;
EXTERN U8   sm_sec; 

void sm_pro(void);
void init_sm(S16 port);
void sm_clr(void);
#endif

